package com.tyrone.gateway.route.filter;

import com.tyrone.gateway.handler.Handler;
import com.tyrone.gateway.route.RouterManager;
import com.tyrone.gateway.route.bean.RequestInfo;
import com.tyrone.gateway.route.bean.RouteInfo;
import com.tyrone.gateway.transport.Invoke;
import org.apache.commons.lang3.ObjectUtils;

import java.util.List;

public class RequestFilter {

    RouterManager routerManager = new RouterManager();

    public RouteInfo filter(RequestInfo requestInfo) {
        //根据RawPath匹配路由规则信息
        RouteInfo routeInfo = routerManager.getRouteInfoByRawPath(requestInfo.getRawPath());
        return routeInfo;
    }
}
